package com.geek.java.ch02;

import java.util.Scanner;

public class IFTest2 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入订票日期（如1.01）: ");
        String date = input.next();

        System.out.println("请输入机票价格：");
        double price = input.nextDouble();

        if (date.equals("1.01")||date.equals("1.02")||date.equals("1.03")||date.equals("5.01")||
                date.equals("5.02")||date.equals("5.03")||date.equals("10.01")||date.equals("10.02")||
                date.equals("10.03")||date.equals("10.04")||date.equals("10.05")||date.equals("10.06")||
                date.equals("10.07"))
        {
            System.out.println("应付"+price+"元");
        }
        else {
            double discountPrice = price * 0.8;
            System.out.println("应付"+discountPrice+"元");

        }
    }
}
